<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/merchantOrder/merchantOrder/financial/orderlist?shopId=${requestScope.shopId}" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td style="width: 330px;"><label class="nowrap" style="width: 30px;">地址：</label> <input type="hidden" name="areaName" class="required" value="${requestScope.record.areaName}" /> <select class="combox required" name="areaCode" id="combox_province" ref="order_combox_city" refUrl="${pageContext.request.contextPath}/system/areas/getCityByProvince?id={value}&isSearch=true" default-value="110000">
							<option value="">请选择</option>
							<c:forEach items="${requestScope.provinces}" var="item">
								<option value="${item.id}" ${item.id==requestScope.dwzPageBean.countResultMap.province?"selected":""}>${item.name}</option>
							</c:forEach>
					</select> <select class="combox required" name="areaCode" id="order_combox_city" ref="order_combox_region" refUrl="${pageContext.request.contextPath}/system/areas/getCountyByAreas?id={value}&isSearch=true" default-value="110100">
							<option value="">请选择</option>
							<c:forEach items="${requestScope.citys}" var="item">
								<option value="${item.id}" ${item.id==requestScope.dwzPageBean.countResultMap.city?"selected":""}>${item.name}</option>
							</c:forEach>
					</select> <select class="combox required" name="areaCode" id="order_combox_region" default-value="110100">
							<option value="">请选择</option>
							<c:forEach items="${requestScope.countys}" var="item">
								<option value="${item.id}" ${item.id==requestScope.dwzPageBean.countResultMap.county?"selected":""}>${item.name}</option>
							</c:forEach>
					</select></td>
					<td>订单编号： <input size="25" placeholder="请输入订单编号" name="org2.orderNum" type="text" postField="orderNum" suggestFields="orderNum" suggestUrl="${pageContext.request.contextPath}/merchantOrder/merchantOrder/getOrderNum" lookupGroup="org2" value="${requestScope.dwzPageBean.countResultMap.orderNum}" />
					</td>
					<%-- <td>选择月份：<input name="addTime" class="date textInput readonly" readonly="true" type="text" value="${requestScope.dwzPageBean.countResultMap.addTime}" placeholder="请选择日期"></td> --%>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="/merchantOrder/merchantOrder/financialexport">
				<li><a href="${pageContext.request.contextPath}/merchantOrder/merchantOrder/financialexport?str=listOrder&shopId=${requestScope.shopId}" target="dwzExport" targetType="navTab" title="是要导出这些记录吗?" class="icon"><span>导出EXCEL</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/merchantOrder/merchantOrder/financial/financiallist">
				<li><a target="navTab" title="门店列表" rel="${pageContext.request.contextPath}/merchantOrder/merchantOrder/financial/financiallist" href="${pageContext.request.contextPath}/merchantOrder/merchantOrder/financial/financiallist" class="goBackBtn" mask="true"><span>返回</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th orderField="order_num" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'order_num'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单编号</th>
				<th orderField="order_process" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'order_process'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单状态</th>
				<th orderField="order_money" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'order_money'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>订单总额</th>
				<th orderField="receivable_money" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'receivable_money'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>应收金额</th>
				<th orderField="real_money" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'real_money'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>实收金额</th>
				<th orderField="pay_time" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'pay_time'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>支付时间</th>
				<th orderField="complete_time" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'complete_time'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>完成时间</th>
				<th orderField="mbcount" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'mbcount'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>进货数量</th>
				<th orderField="saddress" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'saddress'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>店铺地址</th>
				<th orderField="memo"  width="150" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'memo'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>备注</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr>
						<td>${record.orderNum}</td>
						<td>${record.orderProcess == 0 ? '新订单': ''}${record.orderProcess == 1 ? '已受理': ''}${record.orderProcess == 2 ? '待收货': ''}${record.orderProcess == 6 ? '退款中': ''}${record.orderProcess == 7 ? '已退货': ''}${record.orderProcess == 8 ? '取消订单': ''}${record.orderProcess == 9 ? '完成': ''}</td>
						<td>${record.orderMoney*0.01}</td>
						<td>${record.receivableMoney*0.01}</td>
						<td>${record.realMoney*0.01}</td>
						<td><fmt:formatDate value="${record.payTime}" pattern='yyyy-MM-dd HH:mm:ss'/></td>
						<td><fmt:formatDate value="${record.completeTime}" pattern='yyyy-MM-dd'/></td>
						<td>${record.mbcount}</td>
						<td>${record.saddress}</td>
						<td>${record.memo}</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>